package com.bitdf.txing.search.feign;

import com.bitdf.txing.common.utils.R;
import com.bitdf.txing.search.config.FeignInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(
        name = "tx-mall-product",                 // 服务名称
        configuration = FeignInterceptor.class       // 请求拦截器 （关键代码）
)
public interface EsProductFeignService {
    /**
     * 根据属性id获取属性信息（包括属性名，导航等）
     * @param attrId
     * @return
     */
    @RequestMapping("/txing/mall/product/attr/info/{attrId}")
    public R attrInfo(@PathVariable("attrId")Long attrId);

    /**
     * 获取品牌信息
     * @param brandIds
     * @return
     */
    @RequestMapping("/txing/mall/product/brand/infos")
    public R brandsInfo(@RequestParam("brandIds") List<Long> brandIds);
}
